package org.homeorganiser.flex.service;

import java.util.Collection;
import java.util.List;

import org.homeorganiser.flex.dto.Book;
import org.homeorganiser.flex.dto.Category;
import org.homeorganiser.flex.dto.Genre;
import org.homeorganiser.flex.dto.Language;
import org.homeorganiser.flex.dto.Location;
import org.homeorganiser.flex.dto.Publication;
import org.homeorganiser.flex.dto.Quality;
import org.homeorganiser.flex.dto.ScreenShot;
import org.homeorganiser.flex.dto.SubCategory;
import org.homeorganiser.flex.dto.Type;
import org.homeorganiser.flex.manager.BookManager;
import org.homeorganiser.flex.manager.UserManager;
import org.homeorganiser.flex.manager.UtilManager;
import org.homeorganiser.flex.vo.LoggedInUser;
import org.homeorganiser.flex.vo.UserDetail;

public class HomeOrganiserService implements IHomeOrganiserService {

	UserManager usrMgr;
	BookManager bookmgr;
	UtilManager utilmgr;
	/**
	 * @return the usrMgr
	 */
	public UserManager getUsrMgr() {
		return usrMgr;
	}
	/**
	 * @param usrMgr the usrMgr to set
	 */
	public void setUsrMgr(UserManager usrMgr) {
		this.usrMgr = usrMgr;
	}
	
	/**
	 * @param bookmgr the bookmgr to set
	 */
	public void setBookmgr(BookManager bookmgr) {
		this.bookmgr = bookmgr;
	}
	
	
	/**
	 * @param utilmgr the utilmgr to set
	 */
	public void setUtilmgr(UtilManager utilmgr) {
		this.utilmgr = utilmgr;
	}
	public LoggedInUser logIn(String userName, String password) {
		return usrMgr.checkUserlogin(userName, password);
	}
	public boolean checkUserNameAvailiablity(String userName){
		return usrMgr.checkUserNameAvailiablity(userName);
	}
	public String registerUser(UserDetail usrDetail){
		return usrMgr.registerUser(usrDetail);
	}
	public String forgotPassword(String userName) {
		return usrMgr.forgotPassword(userName);
	}
	public List<UserDetail> getAllUsers() {
		return usrMgr.getAllUsers();
	}
	public List<UserDetail> getUsers(String usrName, String firstName,
			String lastName, String usremail) {
		return usrMgr.getUsers(usrName, firstName, lastName, usremail);
	}
	public UserDetail getUserDetail(int userReg) {
		 return usrMgr.getUserDetail(userReg);
	}
	public String updateUserDetail(UserDetail usrDetail) {
		 return usrMgr.updateUserDetail(usrDetail);
	}
	
	public List<Book> getAllBooks() {
		return bookmgr.getAllBooks();
	}
	public List<Language> getAllLanguage(int invtype) {
		return utilmgr.getAllLanguage(invtype);
	}
	public List<Genre> getAllGenre(int invtype) {
		return utilmgr.getAllGenre(invtype);
	}
	public List<Type> getAllType(int invtype) {
		return utilmgr.getAllType(invtype);
	}
	public List<Category> getAllCategory(int invtype) {
		return utilmgr.getAllCategory(invtype);
	}
	public List<SubCategory> getAllSubCategory(int invtype) {
		return utilmgr.getAllSubCategory(invtype);
	}
	public List<Location> getAllLocation(int invtype) {
		return utilmgr.getAllLocation(invtype);
	}
	public List<Quality> getAllQuality(int invtype) {
		return utilmgr.getAllQuality(invtype);
	}
	public List<ScreenShot> getAllScreenshot(int inventoryid) {
		// TODO Auto-generated method stub
		return null;
	}
	public Genre addGenre(Genre genre) {
		return utilmgr.addGenre(genre);
	}
	public Type addType(Type type) {
		return utilmgr.addType(type);
	}
	public Language addLanguage(Language lang) {
		return utilmgr.addLanguage(lang);
	}
	public Category addCategory(Category cat) {
		return utilmgr.addCategory(cat);
	}
	public SubCategory addSubCategory(SubCategory subcat) {
		return utilmgr.addSubCategory(subcat);
	}
	public Location addLocation(Location location) {
		return utilmgr.addLocation(location);
	}
	public Quality addQuality(Quality quality) {
		return utilmgr.addQuality(quality);
	}
	public String addAllScreenShot(Collection<ScreenShot> screenshot) {
		// TODO Auto-generated method stub
		return null;
	}
	public ScreenShot addScreenShot(ScreenShot screenshot) {
		// TODO Auto-generated method stub
		return null;
	}
	public Book addBook(Book book) {
		return bookmgr.addBook(book);
	}
	public List<Publication> getAllPublications(int invtype) {
		return utilmgr.getAllPublication(invtype);
	}
	public Publication addPublication(Publication publication) {
		return utilmgr.addPublication(publication);
	}
	
}
